from django.contrib import admin
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from employee.views import EmployeeViewSet
from product.views import ProductViewSet
from supplier.views import SupplierViewSet
from customer.views import CustomerViewSet
from stock.views import (
    StockInViewSet, StockOutViewSet, StockRecordViewSet,
    StockCheckViewSet, StockTransferViewSet, StockWarningViewSet
)

router = DefaultRouter()
router.register(r'employee', EmployeeViewSet)
router.register(r'product', ProductViewSet)
router.register(r'supplier', SupplierViewSet)
router.register(r'customer', CustomerViewSet)
router.register(r'stock-in', StockInViewSet)
router.register(r'stock-out', StockOutViewSet)
router.register(r'stock-record', StockRecordViewSet)
router.register(r'stock-check', StockCheckViewSet)
router.register(r'stock-transfer', StockTransferViewSet)
router.register(r'stock-warning', StockWarningViewSet)

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/', include(router.urls)),
] 